import $http from "../http";

// 获取部门列表
export const getDepartmentList = (params = {}) => {
    if (params.queryData) {
        params = { ...params, ...params.queryData };
        delete params.queryData;
    }
    return $http.get("/department", params);
}

// 获取部门详情
export const getDepartmetDetail = (params) => $http.get(`/department/${params}`);

// 新增部门
export const addDepartmet = (params) => $http.post("/department", params);

// 修改部门
export const updateDepartment = (params) => $http.put(`/department/${params._id}`, params)

// 删除部门
export const delDepartment = (params) => $http.delete(`/department/${params}`);
